<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>MCUXpresso SDK API Reference Manual: SAI SDMA Driver</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="fs_logo.gif"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">MCUXpresso SDK API Reference Manual
   &#160;<span id="projectnumber">Rev. 0</span>
   </div>
   <div id="projectbrief">NXP Semiconductors</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>API&#160;Reference</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__sai__sdma.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#typedef-members">Typedefs</a>  </div>
  <div class="headertitle">
<div class="title">SAI SDMA Driver<div class="ingroups"><a class="el" href="group__sai.html">SAI: Serial Audio Interface</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:struct__sai__sdma__handle"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__sdma.html#struct__sai__sdma__handle">sai_sdma_handle_t</a></td></tr>
<tr class="memdesc:struct__sai__sdma__handle"><td class="mdescLeft">&#160;</td><td class="mdescRight">SAI DMA transfer handle, users should not touch the content of the handle.  <a href="group__sai__sdma.html#struct__sai__sdma__handle">More...</a><br/></td></tr>
<tr class="separator:struct__sai__sdma__handle"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga545e9717e512139934c92ce20cec1b49"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga545e9717e512139934c92ce20cec1b49"></a>
typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__sdma.html#ga545e9717e512139934c92ce20cec1b49">sai_sdma_callback_t</a> )(I2S_Type *base, sai_sdma_handle_t *handle, status_t status, void *userData)</td></tr>
<tr class="memdesc:ga545e9717e512139934c92ce20cec1b49"><td class="mdescLeft">&#160;</td><td class="mdescRight">SAI SDMA transfer callback function for finish and error. <br/></td></tr>
<tr class="separator:ga545e9717e512139934c92ce20cec1b49"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
SDMA Transactional</h2></td></tr>
<tr class="memitem:gafb886e079a1ae38f0a4c52adeeea1562"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__sdma.html#gafb886e079a1ae38f0a4c52adeeea1562">SAI_TransferTxCreateHandleSDMA</a> (I2S_Type *base, sai_sdma_handle_t *handle, <a class="el" href="group__sai__sdma.html#ga545e9717e512139934c92ce20cec1b49">sai_sdma_callback_t</a> callback, void *userData, <a class="el" href="group__sdma.html#structsdma__handle__t">sdma_handle_t</a> *dmaHandle, uint32_t eventSource)</td></tr>
<tr class="memdesc:gafb886e079a1ae38f0a4c52adeeea1562"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the SAI SDMA handle.  <a href="#gafb886e079a1ae38f0a4c52adeeea1562">More...</a><br/></td></tr>
<tr class="separator:gafb886e079a1ae38f0a4c52adeeea1562"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaedef533756eb45a6da16346540b64243"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__sdma.html#gaedef533756eb45a6da16346540b64243">SAI_TransferRxCreateHandleSDMA</a> (I2S_Type *base, sai_sdma_handle_t *handle, <a class="el" href="group__sai__sdma.html#ga545e9717e512139934c92ce20cec1b49">sai_sdma_callback_t</a> callback, void *userData, <a class="el" href="group__sdma.html#structsdma__handle__t">sdma_handle_t</a> *dmaHandle, uint32_t eventSource)</td></tr>
<tr class="memdesc:gaedef533756eb45a6da16346540b64243"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the SAI Rx SDMA handle.  <a href="#gaedef533756eb45a6da16346540b64243">More...</a><br/></td></tr>
<tr class="separator:gaedef533756eb45a6da16346540b64243"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7f23840aefe5af07667d7b186a614d7d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__sdma.html#ga7f23840aefe5af07667d7b186a614d7d">SAI_TransferTxSetFormatSDMA</a> (I2S_Type *base, sai_sdma_handle_t *handle, <a class="el" href="group__sai.html#structsai__transfer__format__t">sai_transfer_format_t</a> *format, uint32_t mclkSourceClockHz, uint32_t bclkSourceClockHz)</td></tr>
<tr class="memdesc:ga7f23840aefe5af07667d7b186a614d7d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configures the SAI Tx audio format.  <a href="#ga7f23840aefe5af07667d7b186a614d7d">More...</a><br/></td></tr>
<tr class="separator:ga7f23840aefe5af07667d7b186a614d7d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga312b402c963205382c36383956777d08"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__sdma.html#ga312b402c963205382c36383956777d08">SAI_TransferRxSetFormatSDMA</a> (I2S_Type *base, sai_sdma_handle_t *handle, <a class="el" href="group__sai.html#structsai__transfer__format__t">sai_transfer_format_t</a> *format, uint32_t mclkSourceClockHz, uint32_t bclkSourceClockHz)</td></tr>
<tr class="memdesc:ga312b402c963205382c36383956777d08"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configures the SAI Rx audio format.  <a href="#ga312b402c963205382c36383956777d08">More...</a><br/></td></tr>
<tr class="separator:ga312b402c963205382c36383956777d08"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga445bbddd33d0433b17ff60e51a084d4f"><td class="memItemLeft" align="right" valign="top">status_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__sdma.html#ga445bbddd33d0433b17ff60e51a084d4f">SAI_TransferSendSDMA</a> (I2S_Type *base, sai_sdma_handle_t *handle, <a class="el" href="group__sai.html#structsai__transfer__t">sai_transfer_t</a> *xfer)</td></tr>
<tr class="memdesc:ga445bbddd33d0433b17ff60e51a084d4f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs a non-blocking SAI transfer using DMA.  <a href="#ga445bbddd33d0433b17ff60e51a084d4f">More...</a><br/></td></tr>
<tr class="separator:ga445bbddd33d0433b17ff60e51a084d4f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8ac119494447713bbbecd02475f335e9"><td class="memItemLeft" align="right" valign="top">status_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__sdma.html#ga8ac119494447713bbbecd02475f335e9">SAI_TransferReceiveSDMA</a> (I2S_Type *base, sai_sdma_handle_t *handle, <a class="el" href="group__sai.html#structsai__transfer__t">sai_transfer_t</a> *xfer)</td></tr>
<tr class="memdesc:ga8ac119494447713bbbecd02475f335e9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs a non-blocking SAI receive using SDMA.  <a href="#ga8ac119494447713bbbecd02475f335e9">More...</a><br/></td></tr>
<tr class="separator:ga8ac119494447713bbbecd02475f335e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa102f6b25395920a22e84468e38a63b5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__sdma.html#gaa102f6b25395920a22e84468e38a63b5">SAI_TransferAbortSendSDMA</a> (I2S_Type *base, sai_sdma_handle_t *handle)</td></tr>
<tr class="memdesc:gaa102f6b25395920a22e84468e38a63b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Aborts a SAI transfer using SDMA.  <a href="#gaa102f6b25395920a22e84468e38a63b5">More...</a><br/></td></tr>
<tr class="separator:gaa102f6b25395920a22e84468e38a63b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga93db8e9103fdcfc4c7f64c572288d151"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__sdma.html#ga93db8e9103fdcfc4c7f64c572288d151">SAI_TransferAbortReceiveSDMA</a> (I2S_Type *base, sai_sdma_handle_t *handle)</td></tr>
<tr class="memdesc:ga93db8e9103fdcfc4c7f64c572288d151"><td class="mdescLeft">&#160;</td><td class="mdescRight">Aborts a SAI receive using SDMA.  <a href="#ga93db8e9103fdcfc4c7f64c572288d151">More...</a><br/></td></tr>
<tr class="separator:ga93db8e9103fdcfc4c7f64c572288d151"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<hr/><h2 class="groupheader">Data Structure Documentation</h2>
<a name="struct__sai__sdma__handle" id="struct__sai__sdma__handle"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct _sai_sdma_handle</td>
        </tr>
      </table>
</div><div class="memdoc">
<div class="textblock"></div><table class="memberdecls">
<tr><td colspan="2"><h3>Data Fields</h3></td></tr>
<tr class="memitem:a7771c623613c03018e26d1b9744e384b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7771c623613c03018e26d1b9744e384b"></a>
<a class="el" href="group__sdma.html#structsdma__handle__t">sdma_handle_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__sdma.html#a7771c623613c03018e26d1b9744e384b">dmaHandle</a></td></tr>
<tr class="memdesc:a7771c623613c03018e26d1b9744e384b"><td class="mdescLeft">&#160;</td><td class="mdescRight">DMA handler for SAI send. <br/></td></tr>
<tr class="separator:a7771c623613c03018e26d1b9744e384b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abd9f526b0ce960a0501bc496db79eaa1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abd9f526b0ce960a0501bc496db79eaa1"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__sdma.html#abd9f526b0ce960a0501bc496db79eaa1">bytesPerFrame</a></td></tr>
<tr class="memdesc:abd9f526b0ce960a0501bc496db79eaa1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bytes in a frame. <br/></td></tr>
<tr class="separator:abd9f526b0ce960a0501bc496db79eaa1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a63354dffe03c53eda17b58fdb477ba0a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a63354dffe03c53eda17b58fdb477ba0a"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__sdma.html#a63354dffe03c53eda17b58fdb477ba0a">channel</a></td></tr>
<tr class="memdesc:a63354dffe03c53eda17b58fdb477ba0a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Which data channel. <br/></td></tr>
<tr class="separator:a63354dffe03c53eda17b58fdb477ba0a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3ae48227df0f1d087e359b1977ad6e2f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3ae48227df0f1d087e359b1977ad6e2f"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__sdma.html#a3ae48227df0f1d087e359b1977ad6e2f">count</a></td></tr>
<tr class="memdesc:a3ae48227df0f1d087e359b1977ad6e2f"><td class="mdescLeft">&#160;</td><td class="mdescRight">The transfer data count in a DMA request. <br/></td></tr>
<tr class="separator:a3ae48227df0f1d087e359b1977ad6e2f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a18acf2bf467cd7b3e747f3aefc0ad2c3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a18acf2bf467cd7b3e747f3aefc0ad2c3"></a>
uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__sdma.html#a18acf2bf467cd7b3e747f3aefc0ad2c3">state</a></td></tr>
<tr class="memdesc:a18acf2bf467cd7b3e747f3aefc0ad2c3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Internal state for SAI SDMA transfer. <br/></td></tr>
<tr class="separator:a18acf2bf467cd7b3e747f3aefc0ad2c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0c83710178bc5f887fde7f6966bef7b0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0c83710178bc5f887fde7f6966bef7b0"></a>
uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__sdma.html#a0c83710178bc5f887fde7f6966bef7b0">eventSource</a></td></tr>
<tr class="memdesc:a0c83710178bc5f887fde7f6966bef7b0"><td class="mdescLeft">&#160;</td><td class="mdescRight">SAI event source number. <br/></td></tr>
<tr class="separator:a0c83710178bc5f887fde7f6966bef7b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a427de264b01acdb10b79255d84185568"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a427de264b01acdb10b79255d84185568"></a>
<a class="el" href="group__sai__sdma.html#ga545e9717e512139934c92ce20cec1b49">sai_sdma_callback_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__sdma.html#a427de264b01acdb10b79255d84185568">callback</a></td></tr>
<tr class="memdesc:a427de264b01acdb10b79255d84185568"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback for users while transfer finish or error occurs. <br/></td></tr>
<tr class="separator:a427de264b01acdb10b79255d84185568"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9230b0f355a69422000dbb1f9d0cf1b6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9230b0f355a69422000dbb1f9d0cf1b6"></a>
void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__sdma.html#a9230b0f355a69422000dbb1f9d0cf1b6">userData</a></td></tr>
<tr class="memdesc:a9230b0f355a69422000dbb1f9d0cf1b6"><td class="mdescLeft">&#160;</td><td class="mdescRight">User callback parameter. <br/></td></tr>
<tr class="separator:a9230b0f355a69422000dbb1f9d0cf1b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a00d61e5f96c85026e7905efa4c3130e8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__sdma.html#structsdma__buffer__descriptor__t">sdma_buffer_descriptor_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__sdma.html#a00d61e5f96c85026e7905efa4c3130e8">bdPool</a> [<a class="el" href="group__sai.html#ga580bf35fe1f08d7bb054bee399f8b085">SAI_XFER_QUEUE_SIZE</a>]</td></tr>
<tr class="memdesc:a00d61e5f96c85026e7905efa4c3130e8"><td class="mdescLeft">&#160;</td><td class="mdescRight">BD pool for SDMA transfer.  <a href="#a00d61e5f96c85026e7905efa4c3130e8">More...</a><br/></td></tr>
<tr class="separator:a00d61e5f96c85026e7905efa4c3130e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac116902bf38baaf075f08f514ee633cb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__sai.html#structsai__transfer__t">sai_transfer_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__sdma.html#ac116902bf38baaf075f08f514ee633cb">saiQueue</a> [<a class="el" href="group__sai.html#ga580bf35fe1f08d7bb054bee399f8b085">SAI_XFER_QUEUE_SIZE</a>]</td></tr>
<tr class="memdesc:ac116902bf38baaf075f08f514ee633cb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Transfer queue storing queued transfer.  <a href="#ac116902bf38baaf075f08f514ee633cb">More...</a><br/></td></tr>
<tr class="separator:ac116902bf38baaf075f08f514ee633cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c7cd4554d17def82716d8b32b641a6d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5c7cd4554d17def82716d8b32b641a6d"></a>
size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__sdma.html#a5c7cd4554d17def82716d8b32b641a6d">transferSize</a> [<a class="el" href="group__sai.html#ga580bf35fe1f08d7bb054bee399f8b085">SAI_XFER_QUEUE_SIZE</a>]</td></tr>
<tr class="memdesc:a5c7cd4554d17def82716d8b32b641a6d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Data bytes need to transfer. <br/></td></tr>
<tr class="separator:a5c7cd4554d17def82716d8b32b641a6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8ece6225b92c51739378903f40083259"><td class="memItemLeft" align="right" valign="top">volatile uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__sdma.html#a8ece6225b92c51739378903f40083259">queueUser</a></td></tr>
<tr class="memdesc:a8ece6225b92c51739378903f40083259"><td class="mdescLeft">&#160;</td><td class="mdescRight">Index for user to queue transfer.  <a href="#a8ece6225b92c51739378903f40083259">More...</a><br/></td></tr>
<tr class="separator:a8ece6225b92c51739378903f40083259"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac5a697eb0287272aa7491016eb0381d7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac5a697eb0287272aa7491016eb0381d7"></a>
volatile uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sai__sdma.html#ac5a697eb0287272aa7491016eb0381d7">queueDriver</a></td></tr>
<tr class="memdesc:ac5a697eb0287272aa7491016eb0381d7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Index for driver to get the transfer data and size. <br/></td></tr>
<tr class="separator:ac5a697eb0287272aa7491016eb0381d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h4 class="groupheader">Field Documentation</h4>
<a class="anchor" id="a00d61e5f96c85026e7905efa4c3130e8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__sdma.html#structsdma__buffer__descriptor__t">sdma_buffer_descriptor_t</a> sai_sdma_handle_t::bdPool[<a class="el" href="group__sai.html#ga580bf35fe1f08d7bb054bee399f8b085">SAI_XFER_QUEUE_SIZE</a>]</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="ac116902bf38baaf075f08f514ee633cb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__sai.html#structsai__transfer__t">sai_transfer_t</a> sai_sdma_handle_t::saiQueue[<a class="el" href="group__sai.html#ga580bf35fe1f08d7bb054bee399f8b085">SAI_XFER_QUEUE_SIZE</a>]</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a8ece6225b92c51739378903f40083259"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">volatile uint8_t sai_sdma_handle_t::queueUser</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gafb886e079a1ae38f0a4c52adeeea1562"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SAI_TransferTxCreateHandleSDMA </td>
          <td>(</td>
          <td class="paramtype">I2S_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">sai_sdma_handle_t *&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__sai__sdma.html#ga545e9717e512139934c92ce20cec1b49">sai_sdma_callback_t</a>&#160;</td>
          <td class="paramname"><em>callback</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>userData</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__sdma.html#structsdma__handle__t">sdma_handle_t</a> *&#160;</td>
          <td class="paramname"><em>dmaHandle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>eventSource</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function initializes the SAI master DMA handle, which can be used for other SAI master transactional APIs. Usually, for a specified SAI instance, call this API once to get the initialized handle.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SAI base pointer. </td></tr>
    <tr><td class="paramname">handle</td><td>SAI SDMA handle pointer. </td></tr>
    <tr><td class="paramname">base</td><td>SAI peripheral base address. </td></tr>
    <tr><td class="paramname">callback</td><td>Pointer to user callback function. </td></tr>
    <tr><td class="paramname">userData</td><td>User parameter passed to the callback function. </td></tr>
    <tr><td class="paramname">dmaHandle</td><td>SDMA handle pointer, this handle shall be static allocated by users. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaedef533756eb45a6da16346540b64243"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SAI_TransferRxCreateHandleSDMA </td>
          <td>(</td>
          <td class="paramtype">I2S_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">sai_sdma_handle_t *&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__sai__sdma.html#ga545e9717e512139934c92ce20cec1b49">sai_sdma_callback_t</a>&#160;</td>
          <td class="paramname"><em>callback</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>userData</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__sdma.html#structsdma__handle__t">sdma_handle_t</a> *&#160;</td>
          <td class="paramname"><em>dmaHandle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>eventSource</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function initializes the SAI slave DMA handle, which can be used for other SAI master transactional APIs. Usually, for a specified SAI instance, call this API once to get the initialized handle.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SAI base pointer. </td></tr>
    <tr><td class="paramname">handle</td><td>SAI SDMA handle pointer. </td></tr>
    <tr><td class="paramname">base</td><td>SAI peripheral base address. </td></tr>
    <tr><td class="paramname">callback</td><td>Pointer to user callback function. </td></tr>
    <tr><td class="paramname">userData</td><td>User parameter passed to the callback function. </td></tr>
    <tr><td class="paramname">dmaHandle</td><td>SDMA handle pointer, this handle shall be static allocated by users. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga7f23840aefe5af07667d7b186a614d7d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SAI_TransferTxSetFormatSDMA </td>
          <td>(</td>
          <td class="paramtype">I2S_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">sai_sdma_handle_t *&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__sai.html#structsai__transfer__format__t">sai_transfer_format_t</a> *&#160;</td>
          <td class="paramname"><em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>mclkSourceClockHz</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>bclkSourceClockHz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The audio format can be changed at run-time. This function configures the sample rate and audio data format to be transferred. This function also sets the SDMA parameter according to formatting requirements.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SAI base pointer. </td></tr>
    <tr><td class="paramname">handle</td><td>SAI SDMA handle pointer. </td></tr>
    <tr><td class="paramname">format</td><td>Pointer to SAI audio data format structure. </td></tr>
    <tr><td class="paramname">mclkSourceClockHz</td><td>SAI master clock source frequency in Hz. </td></tr>
    <tr><td class="paramname">bclkSourceClockHz</td><td>SAI bit clock source frequency in Hz. If bit clock source is master clock, this value should equals to masterClockHz in format. </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">kStatus_Success</td><td>Audio format set successfully. </td></tr>
    <tr><td class="paramname">kStatus_InvalidArgument</td><td>The input argument is invalid. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga312b402c963205382c36383956777d08"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SAI_TransferRxSetFormatSDMA </td>
          <td>(</td>
          <td class="paramtype">I2S_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">sai_sdma_handle_t *&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__sai.html#structsai__transfer__format__t">sai_transfer_format_t</a> *&#160;</td>
          <td class="paramname"><em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>mclkSourceClockHz</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>bclkSourceClockHz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The audio format can be changed at run-time. This function configures the sample rate and audio data format to be transferred. This function also sets the SDMA parameter according to formatting requirements.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SAI base pointer. </td></tr>
    <tr><td class="paramname">handle</td><td>SAI SDMA handle pointer. </td></tr>
    <tr><td class="paramname">format</td><td>Pointer to SAI audio data format structure. </td></tr>
    <tr><td class="paramname">mclkSourceClockHz</td><td>SAI master clock source frequency in Hz. </td></tr>
    <tr><td class="paramname">bclkSourceClockHz</td><td>SAI bit clock source frequency in Hz. If a bit clock source is the master clock, this value should equal to masterClockHz in format. </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">kStatus_Success</td><td>Audio format set successfully. </td></tr>
    <tr><td class="paramname">kStatus_InvalidArgument</td><td>The input argument is invalid. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga445bbddd33d0433b17ff60e51a084d4f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">status_t SAI_TransferSendSDMA </td>
          <td>(</td>
          <td class="paramtype">I2S_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">sai_sdma_handle_t *&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__sai.html#structsai__transfer__t">sai_transfer_t</a> *&#160;</td>
          <td class="paramname"><em>xfer</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section note"><dt>Note</dt><dd>This interface returns immediately after the transfer initiates. Call SAI_GetTransferStatus to poll the transfer status and check whether the SAI transfer is finished.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SAI base pointer. </td></tr>
    <tr><td class="paramname">handle</td><td>SAI SDMA handle pointer. </td></tr>
    <tr><td class="paramname">xfer</td><td>Pointer to the DMA transfer structure. </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">kStatus_Success</td><td>Start a SAI SDMA send successfully. </td></tr>
    <tr><td class="paramname">kStatus_InvalidArgument</td><td>The input argument is invalid. </td></tr>
    <tr><td class="paramname">kStatus_TxBusy</td><td>SAI is busy sending data. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga8ac119494447713bbbecd02475f335e9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">status_t SAI_TransferReceiveSDMA </td>
          <td>(</td>
          <td class="paramtype">I2S_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">sai_sdma_handle_t *&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__sai.html#structsai__transfer__t">sai_transfer_t</a> *&#160;</td>
          <td class="paramname"><em>xfer</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section note"><dt>Note</dt><dd>This interface returns immediately after the transfer initiates. Call the SAI_GetReceiveRemainingBytes to poll the transfer status and check whether the SAI transfer is finished.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SAI base pointer </td></tr>
    <tr><td class="paramname">handle</td><td>SAI SDMA handle pointer. </td></tr>
    <tr><td class="paramname">xfer</td><td>Pointer to DMA transfer structure. </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">kStatus_Success</td><td>Start a SAI SDMA receive successfully. </td></tr>
    <tr><td class="paramname">kStatus_InvalidArgument</td><td>The input argument is invalid. </td></tr>
    <tr><td class="paramname">kStatus_RxBusy</td><td>SAI is busy receiving data. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaa102f6b25395920a22e84468e38a63b5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SAI_TransferAbortSendSDMA </td>
          <td>(</td>
          <td class="paramtype">I2S_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">sai_sdma_handle_t *&#160;</td>
          <td class="paramname"><em>handle</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SAI base pointer. </td></tr>
    <tr><td class="paramname">handle</td><td>SAI SDMA handle pointer. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga93db8e9103fdcfc4c7f64c572288d151"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SAI_TransferAbortReceiveSDMA </td>
          <td>(</td>
          <td class="paramtype">I2S_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">sai_sdma_handle_t *&#160;</td>
          <td class="paramname"><em>handle</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>SAI base pointer </td></tr>
    <tr><td class="paramname">handle</td><td>SAI SDMA handle pointer. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.5-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul class="foot">
    <li class="footer">&copy; 2016 NXP Semiconductors. All rights reserved.
    </li>
  </ul>
</div>
</body>
</html>
